{% extends "base.html" %}

{% block appbase_script_link %}
<link rel="stylesheet" href="{{ static_url('app/search/css/search.css') }}/">
<link rel="stylesheet" href="{{ static_url('app/base/css/theme/%s.css' % handler.get_theme()) }}">

<!-- build:appbasejs -->
<script type="text/javascript" src="{{ static_url('plugin/jquery-mousewheel/jquery.mousewheel.min.js') }}" defer></script>
<script type="text/javascript" src="{{ static_url('plugin/node-uuid/uuid.js') }}" defer></script>
<script type="text/javascript" src="{{ static_url('app/base/js/appbase.js') }}" defer></script>
<script type="text/javascript" src="{{ static_url('app/message/js/message.js') }}" defer></script>
<script type="text/javascript" src="{{ static_url('app/search/js/search.js') }}" defer></script>
<!-- endbuild -->
{% end %}

{% block navbar %}
<div class="navbar navbar-fixed-top {% if handler.get_theme() == 'black' %}navbar-inverse{% end %}">
    <div class="gradientBar"></div>
    <div class="navbar-inner">
        <div class="container">
            <div class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </div>
            <a class="brand" href="/">
                <img src="{{ static_url('img/logo.png') }}">
            </a>
            <div class="nav-collapse" id="nav-toolbar">
                {% block nav_collapse %}
                <ul class="nav">
                    <li>
                        <a href="/community">
                            社区
                        </a>
                    </li>
                    <li>
                        <a href="/share">
                            分享
                        </a>
                    </li>
                </ul>
                {% end %}

                <ul class="nav pull-right">
                    <li class="search-input">
                        <form class="navbar-search pull-left">
                            <input type="text" name="search" class="search-query" placeholder="搜人、搜话题、搜分享">
                        </form>
                    </li>

                    {% if current_user %}
                    <li class="dropdown" id="unread-message-numbers">
                        <a class="dropdown-toggle note-color" data-toggle="dropdown">
                            <span>
                                <i class="fa fa-envelope-o"></i>
                            </span>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="/home/message?category=friends_dynamic">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;朋友动态&nbsp;
                                </a>
                            </li>
                            <li>
                                <a href="/home/message?category=comment_and_reply">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;评论和回复&nbsp;
                                </a>
                            </li>
                            <li>
                                <a href="/home/message?category=like">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;赞 <i class="fa fa-thumbs-o-up"></i>&nbsp;
                                </a>
                            </li>
                            <li>
                                <a href="/home/message?category=chat_message_new">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;私聊&nbsp;
                                </a>
                            </li>
                            <li>
                                <a href="/profile/leavemessage#header">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;留言&nbsp;
                                </a>
                            </li>
                            <li>
                                <a href="/home/message?category=friend_request_new">
                                    <i class="fa fa-circle-o"></i>
                                    &nbsp;好友请求&nbsp;
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown">
                            {{ current_user['name'] }}<b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="/home">
                                    <i class="fa fa-retweet"></i>
                                    朋友圈子
                                </a>
                            </li>
                            <li>
                                <a href="/profile">
                                    <i class="fa fa-user"></i>
                                   个人主页
                                </a>
                            </li>
                            <li>
                                <a href="/setting/profile">
                                    <i class="fa fa-wrench"></i>
                                    账户设置
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="/logout/">
                                    <i class="fa fa-eject"></i>
                                    登出
                                </a>
                            </li>
                        </ul>
                    </li>
                    {% else %}
                    <li>
                        <a href="/login">
                            登录
                        </a>
                    </li>
                    {% end %}
                </ul>
            </div>
        </div>
    </div>
</div>
{% end %}
